#include<stdio.h>
int main()
{
    int a;
    int b;
    int i;
    while(~scanf("%d%d",&a,&b))
    {
        int count = 0;
        for(i=a;i<=b;i++)
        {
            int a = i/100;
            int b = (i%100)/10;
            int c = i%10;
            if(i == a*a*a+b*b*b+c*c*c)
            {
                printf("%d ",i);
                count ++;
            }
        }
            if(count == 0)
            {
                printf("no\n");
            }
    }
    return 0;
}